package org.dtrd.modules.evaluation.entity.bean.nrs;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.dtrd.modules.evaluation.entity.po.DtrdEntEvaluationRdNrs;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiao
 * @since 2022-08-15
 */
@Getter
@Setter
@ApiModel(value = "营养风险评估计划新增表单")
public class NrsDetail {

    private Integer dataId;


    @NotNull
    @ApiModelProperty(value = "患者Id", required = true)
    private Integer patientId;


    @NotBlank
    @ApiModelProperty(value = "疾病状态 1分-骨选1 ；2分-腹选2 ；3分-颅选3", required = true)
    private String diseaseStatus;

    @NotNull
    @ApiModelProperty(value = "营养状况指标 0分-正常选1 ；1分-3个月选2； 2分-2个月选3； 3分-1个月选4", required = true)
    private Integer nutritionalStatus;

    @NotNull
    @ApiModelProperty(value = "是否大于70岁  0分小于70选1； 1分大于等于70选2", required = true)
    private Integer isSeventy;

    public NrsDetail parseFromPo(DtrdEntEvaluationRdNrs po) {
        dataId = po.getDataId();
        patientId = po.getPatientId();
        diseaseStatus = po.getDiseaseStatus();
        nutritionalStatus = po.getNutritionalStatus();
        isSeventy = po.getIsSeventy();
        return this;
    }
}
